﻿@using QDT.Common
@using QDT.Core.Domain.Enums
@model IList<QDT.Web.Admin.Models.ArticleCateModel>
<div class="main_title">文章分类列表</div>
<div class="blank5"></div>
<div class="button_row">
    <a href="javascript:;" onclick = "foreverdel();" class="button">彻底删除</a>
    <a href="javascript:;" onclick = "restore();" class="button">恢复</a>
</div>
<div class="blank5"></div>
<!-- Think 系统列表组件开始 -->
<div class="grid_box">
 <div class="grid_top"></div>
  @Html.Grid(Model).Columns(column => {
            column.CheckBox(o => o.Id);
            column.For(x => x.Id).Named("编号").SortColumnName("ID");
            column.For(x => x.Title).Named("分类名称").SortColumnName("Title");
            column.For(x => ((ArticleType)x.TypeId).ToLocalizable()).Named("文章类型").SortColumnName("InnerTypeId");
            column.For(x => x.IsEffect ? "有效" : "失效").Named("状态").SortColumnName("IsEffect");
            column.For(x => x.Sort).Named("排序").SortColumnName("Sort");
            column.Buttons(btns => btns.Add(x => Html.ScriptLink("彻底删除", "foreverdel({0})".FormatWith(x.Id)))
                                       .Add(o => Html.ScriptLink("恢复", "restore({0})".FormatWith(o.Id))));
        }).Complex(ViewData)

<!-- Think 系统列表组件结束 -->
 

<div class="blank5"></div>
</div>